<?php
include_once '../../../Core/Conexion.php';
include_once '../../../Core/Controlador.php';
include_once '../../../Core/InterfazDatos.php';
include_once '../../entidades/Materia.php';

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Crear
 *
 * @author cHr15t14n
 */
class Crear extends Controlador{
    function __construct() {
        parent::__construct();
    }

    public function ejecutar() {
        
    $entidad= new Materia("0",$_REQUEST['categoria'],$_REQUEST['nombre'],$_REQUEST['descripcion']);
    $this->conexion->grabar($entidad);
    header("Location: ../lista.php");
    }

//put your code here
}
$controlador= new Crear();
$controlador->ejecutar();

